﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace cwtrock.util
{
    class GetConn
    {
        public SqlConnection con = null;
        private string sqlconconfig = "";
        //
        public SqlConnection GetCon()
        {
            try
            {
                sqlconconfig = Config.Default.sqlconn;
                //转义字符 // 
                con = new SqlConnection(sqlconconfig);
                con.Open();
                return con;
            }// end block try()
            catch (Exception e)
            {
                con = null;
                return con;
            }// end block catch()

        }//end block menthod SqlConnection GetCon()
    }
}
